<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        .box1{
            column-count: 5;
            column-gap: 10px;
            column-rule: 1px solid red;
            max-width: 1200px;
            border: 1px solid red;
            margin: 30px auto;
        }
        .i{
            height: 150px;
            margin-bottom: 20px;
            background-color: pink;
            /* 防止被切 */
            break-inside: avoid-column;
        }
        .box1 .i:nth-child(9) {
            height: 300px;
        }
    </style>
</head>
<body>
    <div class="box1">
        <div class="i"></div>
        <div class="i"></div>
        <div class="i"></div>
        <div class="i"></div>
        <div class="i"></div>
        <div class="i"></div>
        <div class="i"></div>
        <div class="i"></div>
        <div class="i"></div>
        <div class="i"></div>
        <div class="i"></div>
        <div class="i"></div>
        <div class="i"></div>
        <div class="i"></div>
        <div class="i"></div>
        <div class="i"></div>
        <div class="i"></div>
        <div class="i"></div>
        <div class="i"></div>
        <div class="i"></div>
    </div>
</body>
</html>
